home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / quirks.zip / QUIRKS.TXT < prev    next >
Text File  |  1989-04-24  |  62KB  |  1,382 lines

  1. New items added 04/01/89 - 04/24/89
  2.  
  3. Part 1 - CHAIN (QB 4, QB 3, BASCOM 6)
  4.          TAB with REDIM (QB 4.50)
  5.      VAL (QB 4 & BASCOM 6)
  6. Part 2 - BUILDRTM (BASCOM 6)     
  7.          AB45ACVR.HLP and QB45ACVR.HLP (QB 4.50)
  8. -------------------------------------------------------------------------
  9.  
  10. This file contains information about bugs, quirks, and general points
  11. of interest to programmers working with compiled BASIC. It is divided
  12. into four parts:
  13.  
  14.   Part 1 - Description of bugs, quirks, etc.
  15.   Part 2 - General points of interest
  16.   Part 3 - Sample programs
  17.   Part 4 - Video adapters compatible with QB 4.50
  18.  
  19. If you want to find one of the above quickly, use your text editor to
  20. search for the text shown above. i.e., Search for "Part 1 -".
  21.  
  22. As of 12/3/88, all new or changed entries will be marked with the date
  23. that the information as added or changed. The date will appear in the
  24. entry in the format (yy/mm/dd).
  25.  
  26. As of 2/8/89, all references to problems with QB4.00 and QB4.00a have
  27. been removed from this file. It is presumed that all QB programmers
  28. have upgraded either to QB4.50 or QB4.00b. If you are still using
  29. QB4.00 or 4.00a, call Microsoft at 206-454-2030 and ask for a free
  30. upgrade to 4.00b. If you are using BASCOM 6, there is a similar upgrade
  31. available to BASCOM 6.00b.
  32.  
  33. This file is maintained by Mark Novisoff of MicroHelp, Inc. Much of the
  34. information was contributed by members of MicroHelp's BASIC Users Group,
  35. users of the MSSYS forum on Compuserve and users of Mach 2, Stay-Res,
  36. The MicroHelp Toolbox and the QB/Pro Professional series.
  37.  
  38. If you have additional information that should be added, please send it
  39. to:
  40.      Mark Novisoff
  41.      MicroHelp, Inc.
  42.      4636 Huntridge Drive
  43.      Roswell GA 30075
  44.      Compuserve ID 73047,3706 in MSSYS (Microsoft Systems Forum)
  45.      
  46. If possible, please include a *small* sample program that will demonstrate
  47. the problem and cause it to happen whenever the program is run.     
  48.  
  49. -------------------------------------------------------------------------
  50. Part 1 - Description of bugs, quirks, etc.
  51. -------------------------------------------------------------------------
  52.  
  53. Note:   QB 4 under "Compilers" refers QB4.00b and 4.50.
  54.         
  55.     ` Next to a QB 4 entry indicates that the problem has been
  56.         fixed in QB 4.50 and/or the accompanying BC program.
  57.  
  58. Command/Error  Compilers       Description
  59. -------------- --------------- --------------------------------------------
  60. $INCLUDE       QB 4            If you have a DEFINT statement in an include
  61.                                file and you wish to use it within subprograms/
  62.                    functions in a module, you must $INCLUDE it
  63.                    within each sub/function structure. If you
  64.                    simply include it in the mainline code, the
  65.                    DEFINT statement is not recognized. However,
  66.                    if you have a statement DEFINT in your mainline
  67.                    code (as opposed to $INCLUDE), it will work ok.
  68. BLOAD          All             In order to BLOAD a file, the file must have
  69.                                been previously BSAVEd so that the 7 byte
  70.                    "header" is present. Although it may be
  71.                    possible to BLOAD files that were not saved
  72.                    with this header, it is dangerous because
  73.                    BASIC presumes that the header is there and
  74.                    will not load the first 7 bytes into memory.
  75.                    (89/03/31)
  76. CALL (asm)     QB 4            If you pass a static string array as a 
  77.                                parameter to a subprogram, and the string
  78.                    array represents FIELDed data (as in a
  79.                    random file), AND you call an assembly
  80.                    subroutine that displays the data, your
  81.                    position in the file can be wiped out!
  82.                    See sample program #22. The fix is to place
  83.                    the string array in a COMMON SHARED statement
  84.                    and remove it from the parameter list.
  85.                    
  86.                    Added (88/12/19). Even if the string array
  87.                    is NOT a FIELDed array, the data can become
  88.                    corrupt. The new solution is to move all
  89.                    CALL or CALLS statements that have string
  90.                    arrays as parameters to the MAIN program
  91.                    and remove them from SUBs.
  92. CALL           QB 4            If you want to pass a single element from a
  93.                                string array to a subprogram, be sure to put
  94.                    an extra pair of parentheses around the
  95.                    variable name in the parameter list. For 
  96.                    example, you may have a problem with:
  97.                       CALL MySub(A,B,C$(3),D)
  98.                    However, the following should work:
  99.                       CALL MySub((A,B,(C$(3)),D)
  100. CALL (asm)     QB 4            Effective with QB 4, assembly
  101.                                language subroutines must preserve
  102.                                the SI and DI registers and make
  103.                                sure the direction flag is cleared
  104.                                before returning to BASIC.
  105.                    In addition, you must not have a label name
  106.                    after the END statement in your assembler code.
  107. CALL INIT      QB 2-3          Do not name a precompiled subprogram "INIT".
  108.                                If you do, the compiler will go into never-
  109.                    never land when your user library is loaded.
  110. CALL vs GOSUB  All             If you have many calls to the same
  111.                                asm routine or subprogram, you'll
  112.                                use less memory if you set
  113.                                variables and GOSUB to a routine
  114.                                that performs the CALL instead of
  115.                                having the CALL "in line". CALL is
  116.                                much faster using variables than
  117.                                using "literals".
  118. CALLS          QB 4            If you are passing string arrays to an
  119.                                assembler subroutine, make sure that
  120.                    $Static is in effect (not $Dynamic) when
  121.                    you dimension your array. If
  122.                    you do not, the data are not pushed onto
  123.                    the stack correctly by BC. This affects
  124.                    the use of MhBasStringSort in Mach 2.
  125. CALLS          QB 4            When CALLS (note the "S") is used and you
  126.                                compile with "/D" (debug), the segment of
  127.                    of a string element descriptor does not get
  128.                    passed on the stack. In other words, if you
  129.                    have an assembly language subroutine that
  130.                    uses CALLS, you should not compile with "/d".
  131. CHAIN          QB 4, QB 3 &    CHAIN and RUN will work correctly in DOS 2.1
  132.                BASCOM 6        when you compile with the BRUN library. They
  133.                    will not work correctly on the second CHAIN
  134.                    or run attemp if you compile with
  135.                    the BCOM library (/O). You will get one of
  136.                    the following errors: Out of memory, EXE
  137.                    failure, or Error R6005. (89/04/24)
  138. CINT           QB 4            If the number you want to convert is exactly
  139.                                halfway between two integers (i.e., .5), the
  140.                    rounding is done incorrectly when the number
  141.                    that would normally be the result is an odd
  142.                    number. See example program #30. (89/01/03)
  143. CIRCLE         QB 4            The start and end angles must be
  144.                                LESS than 2*pi. Previously they could
  145.                    be less than or equal to.
  146. CLEAR          QB 4            If you use SETMEM to free up memory for
  147.                                use by other routines or modules, the CLEAR
  148.                    statement does not force the compiler to give
  149.                    up that memory. In other words, you must
  150.                    explicitly do a SETMEM(640*1024), or 
  151.                    other large number. (Also see RUN.)
  152.                    Added 89/02/08: If you have an assembler
  153.                    routine that has allocated memory from
  154.                    the pool created by SETMEM (Mach 2's huge
  155.                    string arrays, for example), using
  156.                    SETMEM(640*1024) will still not release
  157.                    the memory. That's because the underlying
  158.                    program has may have done its own